package com.itheima.project.hystrix;

import com.itheima.project.basic.ResponseWrap;
import com.itheima.project.core.enums.sms.SmsSendEnum;
import com.itheima.project.feign.SmsSendFeign;
import com.itheima.project.utils.ResponseWrapBuild;
import com.itheima.project.vo.sms.SendMessageVo;
import com.itheima.project.vo.sms.SmsSendRecordVo;
import org.springframework.stereotype.Component;

/**
 * @ClassName SmsSendHystrix.java
 * @Description SmsSendFeign的Hystrix
 */
@Component
public class SmsSendHystrix implements SmsSendFeign {

    @Override
    public ResponseWrap<Boolean> sendSmsForMq(SendMessageVo sendMessageVo) {
        return ResponseWrapBuild.build(SmsSendEnum.SEND_FAIL,false);
    }

    @Override
    public ResponseWrap<Boolean> sendSms(SendMessageVo sendMessageVo) {
        return ResponseWrapBuild.build(SmsSendEnum.SEND_FAIL,false);
    }

    @Override
    public ResponseWrap<Boolean> querySendSms(SmsSendRecordVo smsSendRecordVo) {
        return ResponseWrapBuild.build(SmsSendEnum.QUERY_FAIL,false);
    }

    @Override
    public ResponseWrap<Boolean> retrySendSms(SmsSendRecordVo smsSendRecordVo) {
        return ResponseWrapBuild.build(SmsSendEnum.RETRY_FAIL,false);
    }
}
